package repository;

import org.apache.commons.dbcp.BasicDataSource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import soundsystem.CDPlayerConfig;

import javax.sql.DataSource;

/**
 * Created by jack on 18/5/31.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = DsConfig.class)
public class DatasourceTest {

    @Autowired
    BasicDataSource ds;

    @Autowired
    JdbcUserRepository jup;

    @Test
    public void test(){

        jup.addUser(new User("jack", "jack"));
        System.out.println("aaa");
    }

}
